A pregnancy test is a diagnostic tool used to determine whether or not an individual is pregnant. It works by detecting the presence of human chorionic gonadotropin (hCG), a hormone produced during pregnancy, in a woman's blood or urine sample. There are two main types of pregnancy tests: urine-based and blood-based. Urine-based tests typically involve collecting a small sample of urine and applying it to a test strip or dipstick that changes color if hCG is present. Blood-based tests, on the other hand, require drawing a woman's blood and testing it for hCG levels. Both types of tests can provide results within minutes, indicating either a positive (pregnant) or negative (not pregnant) result.